package net.osin.playscalajs.GlobalStateManagement

import com.thoughtworks.binding.Binding
import org.lrng.binding.html
import org.scalajs.dom.html.Div
import org.scalajs.dom.raw.Event

class Component1 {
  val addCount =
  {
    event: Event =>
      Store.count.value+=1
  }
  @html
  def render:Binding[Div] =
  {
    <div>
      <p>我是component1</p>
      <button onclick={addCount}>addCount</button>
    </div>
  }
}
